app.controller("orderController",function ($scope,$controller,orderService) {
    $controller("commonController",{$scope,$scope});

    $scope.searchEntity={};//定义搜索对象
    //搜索
    $scope.search=function(pageNum,pageSize){
        orderService.search(pageNum,pageSize,$scope.searchEntity).success(
            function(response){
                $scope.list=response.result;
                $scope.paginationConf.totalItems=response.total;//更新总记录数
            }
        );
    }
    $scope.orderStatus=["未付款","未发货","","已发货","交易成功","交易关闭","申请退款中","退款成功","订单超时"];
    //修改订单状态
    $scope.updateStatus=function (status) {
        orderService.updateStatus($scope.selectedIds,status).success(
            function (response) {
                alert(response.message);
            }
        )
    }
    $scope.sureRefund=function () {
        orderService.sureRefund($scope.selectedIds).success(
            function(response){
                alert(response.message);
            }
        )
    }
});